#!/bin/bash

PIMONHOME=${PIMONHOME:-/etc/pi-mon}

CF=$PIMONHOME/conf.d/disk.cf

over=$(grep -v '^#' $CF | while read mp pc tag
do
    #echo >&2 $mp: $pc $tag
    used=$(df $mp | awk '/^\// { print $5 }')
    [[ "${used%%\%}" -ge $pc ]] && echo -n $tag
done)
[ -z "$over" ] && exit 0
echo "D$over"
exit 1 
